<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			function computed(n) {
				if (n == 0) return 0;
				let a1 = 0,
					a2 = 1;
				for (let i = 1; i < n; i++) {
					[a1, a2] = [a2, a1 + a2];
				}
				return a2;
			}
			console.log(computed(5));
		</script>
	</body>
</html>
